<script type="text/plain" id="_TWEETS_TPL_">
    <div class="post tweet page grid" id="tweets-id-<#=tweets.tweets_id#>">  
        <div class="col2_18 avatar">
            <div class="cate_image cate_image_<#=tweets.cate_id#>">
                <a href="__ROOT__/<#=AGL.school.info.abbr#>/cate/<#=tweets.cate_id#>"><#=AGL.config.TWEETS_CATEGORY[tweets.cate_id]#></a>
            </div>
        </div>
        <div class="col16_18 last">
            <h6>
                <a  href="__ROOT__/<#=AGL.school.info.abbr#>/tweets/<#=tweets.tweets_id#>">
                    <#=tweets.title#>
                </a>
            </h6>
            <p class="tweet_content"><#=tweets.content#></p>
            <div class="footer small grid">
                <#=tweets.create_time#> <span class="tiny"> • </span> <a href="javascript:;" class="comment_link" data-tweets-id="<#=tweets.tweets_id#>">评论</a> 
                <span class="tweet_console">
                    <span class="tiny"> • </span>  
                    <#if(tweets.user_id == AGL.user.info.user_id){#>
                    <a href="__APP__/api/tweets/delete/tweets_id/<#=tweets.tweets_id#>" data-tweets-id="<#=tweets.tweets_id#>" class="delete_link">删除</a>
                    <#}else{#>
                    <a href="__APP__/api/message/dialog/tweets_id/<#=tweets.tweets_id#>/user_id/<#=tweets.user_id#>" data-tweets-id="<#=tweets.tweets_id#>" data-user-id="<#=tweets.user_id#>" data-nickname="<#=tweets.nickname#>" class="message_link">私信</a> <span class="tiny"> • </span> 
                    <a href="__APP__/api/report/dialog/tweets_id/<#=tweets.tweets_id#>" data-tweets-id="<#=tweets.tweets_id#>" class="report_link">移除</a>
                    <#}#>
                </span>
            </div>
            <div class="comments">
                <#if(tweets.comment){#>
                <#if(show_more_comment && tweets.comment_count > 2){#>
                <div class="more_comments">
                    <a href="__ROOT__/<#=AGL.school.info.abbr#>/tweets/<#=tweets.tweets_id#>#comment" class="more_comments_link" data-tweets-id="<#=tweets.tweets_id#>">点击查看更多评论</a>
                </div>
                <#}#>
                <#
                if(tweets.comment){
                for(var i = 0; i < tweets.comment.length; i++){
                var comment = tweets.comment[i];
                #>
                <div class="comment grid small" id="comment-id-<#=comment.comment_id#>">
                    <p>
                        <span class="fruit"><strong>
                                <#if(comment.user_id == tweets.user_id){#>
                                楼主
                                <#}else{#>
                                <#=comment.nickname#>
                                <#}#>:</strong></span>
                        <span class="comment_floor right"><#=comment.floor#>F</span>
                        <span class="comment_body">
                            <#if(comment.status==0){#>
                                <#if(AGL.user.info.user_id == comment.user_id){#>
                                    <span style="text-decoration: line-through"><#=comment.content#></span>
                                    <span class="tweets_deleted">该评论已被删除！</span>
                                <#}else{#>
                                    该评论已被删除！
                                <#}#>
                            <#}else{#>
                                <#=comment.content#>
                            <#}#>
                        </span>
                    </p>
                    <div class="footer grid">
                        <#=comment.create_time#> <span class="tiny"> • </span> 
                        <a href="javascript:;" class="comment_link" data-tweets-id="<#=tweets.tweets_id#>" data-comment-id="<#=comment.comment_id#>">回复</a> 
                        <#if(comment.status==1){#>
                        <span class="comment_console">
                            <span class="tiny"> • </span> 
                            <#if(comment.user_id == AGL.user.info.user_id){#>
                            <a href="__APP__/api/comment/delete/comment_id/<#=comment.comment_id#>" data-comment-id="<#=comment.comment_id#>" class="delete_link">删除</a>
                            <#}else{#>
                            <a href="__APP__/api/message/dialog/tweets_id/<#=tweets.tweets_id#>/user_id/<#=comment.user_id#>" data-comment-id="<#=comment.comment_id#>" data-user-id="<#=comment.user_id#>" data-nickname="<#=comment.nickname#>" class="message_link">私信</a> <span class="tiny"> • </span> 
                            <a href="__APP__/api/report/dialog/comment_id/<#=comment.user_id#>" data-comment-id="<#=comment.comment_id#>" class="report_link">移除</a>
                            <#}#>
                        </span>
                        <#}#>
                    </div>
                </div>
                <#
                }
                }
                #>
                <#}#>
                <div class="new_comment <#if(show_more_comment){#>hidden<#}#>" id="comment-form<#=tweets.tweets_id#>">
                    <form action="__ROOT__/api/comment/save" method="post">
                        <input type="hidden" value="<#=AGL.school.info.id#>" name="school_id" />
                        <input type="hidden" value="<#=tweets.tweets_id#>" name="tweets_id" />
                        <input type="hidden" value="0" name="parent_id" />
                        <textarea placeholder="评论内容..." name="content" class="textarea comment_content" style="width:100%;"></textarea>
                        <button type="submit" class="btn btn_silver fbold submit_comment"><span>加上去</span></button>
                        <span class="new_comment_error red small"></span>
                    </form>
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/plain" id="_NEW_TWEETS_TPL_">
    <div class="post tweet page grid" id="tweets-id-<#=tweets_id#>">  
        <div class="col2_18 avatar">
            <div class="cate_image cate_image_<#=cate_id#>">
                <a href="__ROOT__/<#=AGL.school.info.abbr#>/cate/<#=cate_id#>"><#=AGL.config.TWEETS_CATEGORY[cate_id]#></a>
            </div>
        </div>
        <div class="col16_18 last">
            <h6>
                <a  href="__ROOT__/<#=AGL.school.info.abbr#>/tweets/<#=tweets_id#>">
                    <#=title#>
                </a>
            </h6>
            <p class="tweet_content"><#=content#></p>
            <div class="footer small grid">
                <#=create_time#> <span class="tiny"> • </span> <a href="javascript:;" class="comment_link" data-tweets-id="<#=tweets_id#>">评论</a> 
                <span class="tweet_console">
                    <span class="tiny"> • </span>  
                    <a href="__APP__/api/tweets/delete/tweets_id/<#=tweets_id#>" data-tweets-id="<#=tweets_id#>" class="delete_link">删除</a>
                </span>
            </div>
            <div class="comments">
                <div class="new_comment hidden" id="comment-form<#=tweets_id#>">
                    <form action="__ROOT__/api/comment/save" method="post">
                        <input type="hidden" value="<#=AGL.school.info.id#>" name="school_id" />
                        <input type="hidden" value="<#=tweets_id#>" name="tweets_id" />
                        <input type="hidden" value="0" name="parent_id" />
                        <textarea placeholder="评论内容..." name="content" class="textarea comment_content" style="width:100%;"></textarea>
                        <button type="submit" class="btn btn_silver fbold submit_comment"><span>加上去</span></button>
                        <span class="new_comment_error red small"></span>
                    </form>
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/plain" id="_NEW_COMMENT_TPL_">
    <div id="comment-id-<#=comment_id#>" class="comment grid small">
        <p>
            <span class="fruit"><strong>
            <#=nickname#>
            :</strong></span>
            <span class="comment_floor right"><#=floor#>F</span>
            <span class="comment_body"><#=content#></span>
        </p>
        <div class="footer grid">
            <#=create_time#> <span class="tiny"> • </span> 
            <a href="javascript:;" class="comment_link" data-tweets-id="<#=tweets_id#>" data-comment-id="<#=comment_id#>">回复</a> 
            <span class="comment_console">
                <span class="tiny"> • </span> 
                <#if(user_id == AGL.user.info.user_id){#>
                <a href="__APP__/api/comment/delete/comment_id/<#=comment_id#>" data-comment-id="<#=comment_id#>" class="delete_link">删除</a>
                <#}else{#>
                <a href="__APP__/api/message/dialog/tweets_id/<#=tweets_id#>/user_id/<#=user_id#>" data-comment-id="<#=comment_id#>" data-user-id="<#=user_id#>" data-nickname="<#=nickname#>" class="message_link">私信</a> <span class="tiny"> • </span> 
                <a href="__APP__/api/report/dialog/comment_id/<#=user_id#>" data-comment-id="<#=comment_id#>" class="report_link">移除</a>
                <#}#>
            </span>
        </div>
    </div>
</script>
<script type="text/plain"  id="_PARENT_COMMENT_TPL_">
    <div class="d_content parent_comment_body">
        <strong><#=nickname#></strong>: <#=content#><br />
        <span class="silver small">
            <#=create_time#>
        </span>
        <span class="layer_arrow l_arrow_down"><i></i></span>
    </div>
</script>